package exprtree;

import visitor.Visitor;

public class VarExpr extends Expr {

	private Expr expr;

	/**
	 * VarExpr
	 */
	public VarExpr(){}

	/**
	 * VarExpr
	 * @param expr which is an Expr object
	 */
	public VarExpr(Expr expr){
		this.expr = expr;
	}

	/**
	 * getExpr
	 * @return an Expr
	 */
	public Expr getExpr() {
		return expr;
	}

	/**
	 * setExpr
	 * @param expr which is an Expr object
	 */
	public void setExpr(Expr expr) {
		this.expr = expr;
	}

	/**
	 * accept
	 * @param visitor which is a Visitor object
	 * @return an Object
	 */
	public Object accept(Visitor visitor){
		return visitor.visit(this);
	}
}
